<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    function p1() {
         new Promise((reject,resolve) => {
            resolve('p1')
        })
    }


    function p2() {
         new Promise((reject, resolve) => {
            resolve('p2')
        })
    }

     async function fn() {
        await new Promise((resolve, reject) => {
            resolve('p1')
        })

         await new Promise((resolve, reject) => {
             resolve('p2')
         })
    }

    fn()
</script>
</body>
</html>
